import { defineStore } from 'pinia'
export const useGameDetailStore = defineStore('gameDetail', {
	state: () => ({
		isPlaying: false,
		currentGameDetails: {} as any,
		fairnessDialog: false, // 公平性弹窗状态
		gameResultData: null, // 游戏结果数据
		updateGameResult: null // 更新游戏结果状态
	}),
	actions: {
		setPlayingStatus(val: boolean) {
			this.isPlaying = val
		},
		setCurrentGameDetails(data: any) {
			this.currentGameDetails = data
		},
		setFairnessDialog(open: boolean) {
			this.fairnessDialog = open
		},
		setGameResult(data: any) {
			this.gameResultData = data
		},
		setUpdateGameResult(time: any) {
			this.updateGameResult = time
		}
	},
	getters: {},
	persist: true
})
